home *** CD-ROM | disk | FTP | other *** search
/ Sunday Savers: Sharing Fun! I Know My Savior Lives / Sunday Savers: Sharing Fun! I Know My Savior Lives.iso / mac / Xtras / PrintOMatic MX 1.7.3 / PrintOMatic MX (Win32) / -PrintOMatic MX Demo.dir / 00037.txt < prev    next >
Encoding:
Text File  |  2004-04-06  |  5.5 KB  |  100 lines

  1.     type of object          what gets appended
  2.     _________________________________________________________________
  3.     
  4.     text field cast member  the text of the field, using the 
  5.                             specified fonts and styles
  6.  
  7.     rich text cast member   the bitmap image of the cast member,
  8.                             including anti-aliasing
  9.  
  10.     bitmap cast member      the cast member graphic
  11.  
  12.     PICT cast member        the cast member graphic
  13.  
  14.     cast library            all printable cast members in the 
  15.                             library, in cast sequence
  16.  
  17.     sprite                  the cast member of the sprite
  18.  
  19.     text string             the text string, in the default font 
  20.                             (Geneva 10pt on Macintosh, 
  21.                             Arial 10pt on Windows)
  22.     
  23.     list                    the elements in the list
  24.  
  25. Example:
  26.  
  27. The following example creates a PrintOMatic document, sets the document name, creates the first page, adds a frame to it, and appends a number of items to the document, and prints it:
  28.  
  29.     set doc = new(xtra "PrintOMatic")
  30.     if not objectP(doc) then exit
  31.     setDocumentName doc, "My Example Document"
  32.     newPage doc
  33.     newFrame doc, Rect(0,0,getPageWidth(doc),getPageHeight(doc)
  34.     append doc, sprite 1, TRUE
  35.     append doc, [member "image", member "caption", sprite 5], TRUE
  36.     append doc, castLib "printout", TRUE
  37.     if doJobSetup(doc) then print doc
  38.     set doc = 0appendFile
  39.  
  40. Syntax:    appendFile document, fileName [, ... , autoAppend ]
  41.  
  42. The appendFile command appends one or more text or graphics files to the current "frame" of a document object. If no current frame exists in your document, the PrintOMatic Xtra will attempt to create a "default" frame for you, which is the width and height of the page, minus the current margins.
  43.  
  44. For details on how to use the autoAppend parameter, please see the for the append command.
  45.  
  46. The following file formats are supported by appendFile. The actual format of the file will be auto-detected by the appendFile command.
  47.  
  48.     file type    notes
  49.     _________________________________________________________________
  50.     
  51.     plain text    Normal ASCII format text, with or 
  52.                 without DOS line-feed characters
  53.  
  54.     styled text    (Macintosh only) Macintosh ASCII text 
  55.                 file with a 'styl' resource, such as 
  56.                 files created by SimpleText
  57.     EPS            Encapsulated PostScript file, with or 
  58.                 without a preview image
  59.  
  60.     PICT            Macintosh PICT format file (only raster 
  61.                 PICT files supported on Windows)
  62.  
  63.     BMP            (Windows only) BMP files of any 
  64.                 bit depth
  65.  
  66. Notes on Printing EPS Files
  67.  
  68. You should avoid using EPS files if you want your printing code to work reliably with all types of printers. Many, many popular printers attached to Macintosh and Windows PC's DO NOT support PostScript printing. The output that PrintOMatic generates on these types of printers can vary from low-resolution bitmaps to placeholder boxes to nothing at all.
  69.  
  70. Assuming you decide not to heed this warning, here are some tips that may improve your success.
  71.  
  72. Many applications that generate EPS files allow you to create files in "ASCII" or "binary" format. PrintOMatic prints ASCII format PostScript files MUCH more reliably than binary files. Under some conditions, PrintOMatic will print binary PostScript files just fine. However, certain types of printer connections work very poorly with binary PostScript. Specifically, serial printers that use XON/XOFF flow control often mistake binary data for flow control codes, and will seriously garble or crash your print job.
  73.  
  74. Some types of PostScript files, notably those generated by using the "print to disk" feature of the LaserWriter driver, don't contain "bounding box" information. PrintOMatic needs bounding box information to determine the size of a PostScript image for placement on the page, and will generate an error if this information can't be found.
  75.  
  76. You can manually add bounding box information to PostScript files using a text editing program. Insert the following line of text into the file somewhere between the !%PS-Adobe-3.0 and %%EndComments lines at the beginning of the file, substituting the width and height of the page (in points) for the 'x' and 'y' values:
  77.  
  78. %%BoundingBox: 0 0 x y
  79.  
  80. Finally, keep in mind that PostScript is a programming language with a broad set of features, some of which are supported differently by different printers. This makes EPS files MUCH more prone to printing errors and incompatibilities than other file formats, such as PICT or BMP. This is another good reason to avoid using EPS files if at all possible.getInsertionPoint
  81.  
  82. Syntax:    getInsertionPoint(document)
  83.  
  84. Returns: A string in the format "page, x, y", or VOID if there is no insertion point.
  85.  
  86. The getInsertionPoint function returns the page number and coordinates at which the next append or appendFile command will insert new content into the document. This can be useful for deciding when to manually break pages, or allow you to place graphics in the margins of a document next to accompanying text.
  87.  
  88. Example:
  89.  
  90. The following code checks for an insertion point, and if there is one, places a graphic in the margin next to the insertion point:
  91.  
  92.     set the itemDelimiter = ","
  93.     set insPt = getInsertionPoint(doc)
  94.     if stringP(insPt) then
  95.         drawPicture member "dingbat", Point(-10, integer(item 3 of insPt))
  96.     end ifpageBreak
  97.  
  98. Syntax:    pageBreak document
  99.  
  100. Stops the text flow in the current frame. All text appended after calling pageBreak will start on the next frame. If you are using the default full-page frames, the text will start on the next page. Be sure to leave the autoAppend parameter set to TRUE if you want to automatically create new frames after the break.